package com.iversonx.responsibility_chain.example_1.v2;

import com.iversonx.responsibility_chain.example_1.v1.FeeRequest;

/**
 *
 **/
public abstract class AbstractFeeRequestHandler {
    
    
    public final String handle(FeeRequest parameter) {
        String result = null;
        if(support(parameter.getFee())) {
            result = doHandle(parameter);
        }
        return result;
    }
    
    protected abstract boolean support(double fee);
    
    protected abstract String doHandle(FeeRequest parameter);
}
